<template>
  <van-tabbar v-model="active" @change="onChange">
    <van-tabbar-item v-for="(item, i) in tabbars" :key="i" :icon="item.icon">{{
      item.name
    }}</van-tabbar-item>
  </van-tabbar>
</template>

<script>
export default {
  data() {
    return {
      active: 0
    };
  },
  props: {
    tabbars: {
      type: Array,
      default: () => [
        {
          name: "首页",
          icon: "wap-home-o",
          path: "home"
        },
        {
          name: "分组",
          icon: "qr",
          path: "group"
        }
      ]
    },
    onChange: {
      type: Function
    }
  }
};
</script>

<style></style>
